package day14.tarena.homeword;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class TestIterator {

	public static void main(String[] args) {
		Map<Integer, String> map = new HashMap<Integer, String>();
		map.put(11, "apple");
		map.put(12, "pear");
		map.put(13, "orange");
		map.put(14, "banana");
		//System.out.println(map);
		Set<Integer> set = map.keySet();
		Iterator<Integer> it = set.iterator();
		while(it.hasNext()){
			Integer key = it.next();
			String value = map.get(key);
			System.out.println(key+":"+map.get(key));
		}
		}
}
